import Vue from 'vue';
import VueRouter from 'vue-router';
import Article from '../components/router/article.vue';
import Brief from '../components/router/brief.vue';
import Experience from '../components/router/experience.vue';
import Share from '../components/router/share.vue';
import Tools from '../components/router/tools.vue';
import ToolsPage from '../components/router/tools-page.vue';

Vue.use(VueRouter);

let router = new VueRouter({
  routes: [
    {
      // 如果只有一条杠或者链接中什么都没有的情况下，重定向到brief页面
      path: '/',
      redirect: 'brief',
      component: Brief
    },
    {
      path: '/brief',
      component: Brief
    },
    {
      path: '/article',
      component: Article
    },
    {
      path: '/experience',
      component: Experience
    },
    {
      path: '/share',
      component: Share
    },
    {
      path: '/tools',
      component: Tools
    },
    {
      path: '/tools-page/:id',
      component: ToolsPage
    }
  ],
  linkActiveClass: 'arctive'
});

export default router;
